package com.eupmt.lab3.domain;

import com.eupmt.lab3.domain.ibator.IbatorDistribuidor;
import static com.eupmt.lab3.utils.Constants.*;

public class Distribuidor extends IbatorDistribuidor implements Cloneable {

    public Distribuidor() {
        super();
        setIddistribuidor(UNDEFINED);
    }

    @Override
    public boolean equals(Object o) {
        return (o != null) &&
                (o instanceof Distribuidor) &&
                (getCif().equals(((Distribuidor) o).getCif()));
    }

    @Override
    public int hashCode() {
        int hash = 5;
        return hash;
    }

    @Override
    public String toString() {
        String str = "\n Client.\n";
        str += "Nom: " + getNom() + "\n";
        str += "CIF: " + getCif() + "\n";
        str += "Adreça: " + getAdreca() + "\n";
        str += "Telefon: " + getTelefon() + "\n";
        str += "Email: " + getEmail() + "\n";
        str += "Numero Compte: " + getNumcompte() + "\n";
        str += "Preu Hora: " + getPreuhora() + "\n";
        return str;
    }
}
